import service from './request'

export function getAvailableCoupons(orderAmount) {
  return service.get('/coupons/available', {
    params: { orderAmount }
  })
}

export function startPayment(orderId) {
  return service.post('/payment/pay', { orderId })
}

export function sendPaymentCallback(orderId, status = 'SUCCESS') {
  return service.post('/payment/callback', {
    orderId,
    paymentStatus: status,
    transactionId: 'TX' + Date.now()
  })
}
